package com.sf.detegate;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 埔枘
 * @date 2019/12/02
 **/
public class Leader implements IExcuter{

    private Map<String,IExcuter> targets = new HashMap<String,IExcuter>();
    public Leader() {
        targets.put("加密",new ExcuterA());
        targets.put("登录",new ExcuterB());
    }

    public void excute(String commnd) {
        targets.get(commnd).excute(commnd);
    }
}
